# -*- encoding: utf-8 -*-

import pygame
import graphics
import config

class Sprite(pygame.sprite.Sprite):
    "Crea un Sprite con su imagen y su rect"
    
    def __init__(self, image, fil=1, col=1, tile=0):
        pygame.sprite.Sprite.__init__(self)
        if tile:
            self.image = image
        else:
            self.images = graphics.cut_sprite(config.sprites+image, fil, col)
            self.image = self.images[0][0]
        self.rect = self.image.get_rect()

    def draw(self, screen):
        "Dibuja el sprite"
        screen.blit(self.image, self.rect)
       